@echo off

if [%1]==[] goto usage

@echo ****** Preliminary testing ******
copy !preliminary.ini !test.ini > NUL
..\etc\!test.exe %*
if ERRORLEVEL 1 goto :ERROR

@echo ****** Main testing ******
copy !main.ini !test.ini > NUL
..\etc\!test.exe %*
goto :FINISH

:ERROR
@echo Preliminary testing failed!
goto :FINISH

:usage
@echo Usage: test.bat filename.exe
pause
exit 1

:FINISH
del !test.ini
